using System;
using MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;
using MinimalistFoodStreet.BackEnd.Infrastructure.Dtos.Request.Tables;

namespace MinimalistFoodStreet.BackEnd.Server.Server.RequestExtend.Tables 
{
	public static class GoodsRequestCreateExtend 
	{
		public static Good ToCreateEntity(this RequestCreateGoodsDto dto)
		{
			return new Good 
			{
				GGoodTypeId = dto.goodTypeId,
				GName = dto.name,
				GPrice = dto.price,
				GDescription = dto.description,
				GSpecs = dto.specs,
				GIsDirectly = dto.isDirectly,
				GBirthday = dto.birthday,
				GExpiryday = dto.expiryday,
				GInventory = dto.inventory,
			};
		}
	}
}